package com.kasinf.sample.satoken.config;

import cn.dev33.satoken.stp.StpInterface;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @Author : Kaiser
 * @Date: 2025/5/16  15:32
 */
@Component
public class UserPermission implements StpInterface {
    @Override
    public List<String> getPermissionList(Object loginId, String loginType) {
        return "1".equals(loginId) ? List.of("user:add", "user:edit", "user:delete") : List.of();
    }

    @Override
    public List<String> getRoleList(Object loginId, String loginType) {
        return "1".equals(loginId) ? List.of("superAdmin") : List.of();
    }
}
